<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');?>
<?php if(isset($current_view_hints)):?>
	<p class="hints"><strong>正在查看:</strong> <?php echo $current_view_hints;?></p>
<?php endif;?>

<?php if(!empty($posts) && is_array($posts)):?>
	<?php foreach($posts as $post):?>
	<div class="post">
		<h2 class="title"><?php echo anchor($post->permalink, $post->title);?></h2>
		<h5 class="meta">
			<span class="date">发表于：<?php echo $post->published;?></span>
			<span > <?php #echo Common::format_metas($post->categories, ',');?></span>
			<span class="posted">作者: <?php echo anchor(site_url('authors/'. $post->authorId), $post->screenName);?></span>
			<span class="no-border"></span>
		</h5>
		
		<div class="entry">
			<?php echo $post->excerpt;?>
			

		</div>
		<div class="tags">
			
			<p class="links"><?php if($post->more):?><?php echo anchor($post->permalink, '&raquo;阅读全文');?>&nbsp;&nbsp;&nbsp;&nbsp;|<?php endif;?>&nbsp;&nbsp;&nbsp;&nbsp; <?php echo anchor($post->permalink . '#comments', '评论('.$post->commentsNum.')' );?>
			<?php if(!empty($post->tags)):?>
				&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;
				Tags: <?php echo Common::format_metas($post->tags, ',');?>
			<?php endif;?></p>
		</div>
	</div>
	<?php endforeach;?>
<?php endif;?>

<?php if(isset($pagination)):?>
	<?php echo $pagination;?>
<?php endif;?>
    <div style="clear: both;">&nbsp;</div>